/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pnt.message.objects;

/**
 *
 * @author andrew
 */
public class User {
    private String username;
    private NodeType nodetype;
    
    public User(NodeType nodetype, String name){
        this.username = name;
        this.nodetype = nodetype;
    }

    public String getUsername() {
        return username;
    }

    public NodeType getNodetype() {
        return nodetype;
    }
    
    
    public enum NodeType{
        SUPER_NODE, END_NODE;
    }
    
    public String toString(){
    	if (nodetype == NodeType.SUPER_NODE) return "SN:" + username;
    	if (nodetype == NodeType.END_NODE) return "EN:" + username;
    	return super.toString();
    }
}
